<template>
<div>
<School></School>
<Student @wa = 'show' ref='stu' @demo='demo'></Student>
</div>
</template>

<script>
import School from './components/School.vue'
import Student from './components/Student.vue'
export default {
    name:'App',
    components:{
        School,
        Student
    },
    methods:{
        show(name){
            console.log("我是谁？"+name)
        },
        demo(){
            console.log('demo事件被触发了')
        }
    },
        mounted() {
            
        }
}

// 就算你给组件绑定原生事件，他们也会以为是自定义事件，你需要在后面加个事件修饰符.native才行
</script>


<style>

</style>